﻿using System.Web.Mvc;
using Project.DAL.Repository;

namespace Project.WebUI.Areas.Admin.Controllers
{
    public class InstallController : Controller
    {

        #region "private"
        private readonly IUserRepository _userRepository;
        private readonly IDepositRepository _depositRepository;
        private readonly IWithDrawRepository _withDrawRepository;
        private readonly IUserService _userService;
        private readonly ICountryRepository _countryRepository;
        private readonly IContactRepository _contactRepository;        
        private readonly IStoreSecureRepositoty _storeSecureRepositoty;

        public InstallController(
            IUserRepository userRepository,
            IDepositRepository depositRepository,
            IWithDrawRepository withDrawRepository,
            IUserService userService,
            ICountryRepository countryRepository,
            IContactRepository contactRepository,
            IStoreSecureRepositoty storeSecureRepositoty)
        {
            _userRepository = userRepository;
            _depositRepository = depositRepository;
            _withDrawRepository = withDrawRepository;
            _userService = userService;
            _countryRepository = countryRepository;
            _contactRepository = contactRepository;
            _storeSecureRepositoty = storeSecureRepositoty;
        }

        #endregion                       
        public ActionResult Index()
        {
            return !_userRepository.CountAdmin()
                       ? RedirectToAction("Register", "Account")
                       : RedirectToAction("index", "Manage");
        }
    }
}
